    <?php $this->load->view('user/head');?>
	<script type="text/javascript">
	function check_email() {
		//先验证有效,后验证重复
		var email = $('#email').val();
		if(email == ''){
			$('#email_error').attr('class','error');
			$('#email_error').html('请输入email地址');
		}else{
			if (/^[\w-]+[\.]*[\w-]+[@][\w\-]{1,}([.]([\w\-]{1,})){1,3}$/.test(email)){
				$.post('ajax_validate_email', {email:$('#email').val(),temp_data:new Date()}, function(data) {
					if (data.length > 3){
						//已经存在
						$('#email_error').attr('class','error');
						$('#email_error').html('email已经被注册');
						} else {
							//ok
							$('#email_error').attr('class','moreInfo');
							$('#email_error').html('');
							}
				});				
				}else {
					$('#email_error').attr('class','error');
					$('#email_error').html('请输入有效的email地址');
					}
			}
	}
	function check_name(){
		var name = $('#name').val();
		if (name ==''){
			$('#user_name-S').attr('class','error');
			$('#user_name-S').html('庆典名称不能为空');
			}else {
		if (name.length > 30){
			$('#user_name-S').attr('class','error');
			$('#user_name-S').html('不能超过30个字符');
			} else {
			$('#user_name-S').attr('class','moreInfo');
			$('#user_name-S').html('');
				}
			}

		}
	function check_password(){
		var password = $('#password').val();
		if (password.length < 6){
			$('#password_error').attr('class','error');
			$('#password_error').html('密码应该在6-20个字符之间');
		}else {
		if (password.length > 20){
			$('#password_error').attr('class','error');
			$('#password_error').html('密码应该在6-20个字符之间');
			} else {
					$('#password_error').attr('class','moreInfo');
					$('#password_error').html('');
			
				}
		}
		}
	function check_rpass(){
		if($('#password').val()!=$('#repasswd').val()){
			$('#repasswd_error').attr('class','error');
			$('#repasswd_error').html('两次输入的密码不一致');
			} else {
				$('#repasswd_error').attr('class','moreInfo');
				$('#repasswd_error').html('');
				}
		}
		 function lastcheck(){
			check_email();
			check_name();
			check_password();
			check_rpass();
			var email = $('#email_error').html();
			var name = $('#user_name-S').html();
			var pass = $('#password_error').html();
			var rpass = $('#repasswd_error').html();
			if(email != '' || name != '' || pass != ''||rpass != '' ){return false;}else {return true;}
			}
	</script>
    <!-- begin: main content area #main -->
    <div id="main">
        <!-- Subtemplate: 2 Spalten mit 50/50 Teilung -->
        <div class="subcolumns">
          <div class="c62l">
            
            <div id="content" class="subcl" role="main">
                  <h2 style="font-size:14px;font-weight: bold;margin-bottom:20px;">婚庆公司 注册页面</h2>
                  <div class="subcolumns">
                    <form action="regist" method="post" onsubmit="return lastcheck()">
					<div style="color:red">
    				<?php echo validation_errors(); ?>
					</div>
					<ul class="userInfo">
						<li><span class="label">Email帐号：</span><input onblur='check_email()' name="email" id="email" tabindex="1" type="text" value="<?php echo set_value('email'); ?>"><span id='email_error' class="moreInfo">用户登录</span></li>
						<li><span class="label">庆典名称：</span><input onblur='check_name()' name="name" id="name" tabindex="2" maxlength="16" type="text" value="<?php echo set_value('name'); ?>"><span id="user_name-S" class="moreInfo">中英文均可 不超过30个字符</span></li>
						<li><span class="label">登录密码：</span><input onblur='check_password()' name="password" id="password" tabindex="3" maxlength="16" value="<?php echo set_value('password'); ?>" type="password"><span id='password_error' class="moreInfo">登录使用密码，可以是6至16位数字或字母</span></li>
						<li><span class="label">重填密码：</span><input onblur='check_rpass()' name="repasswd" id="repasswd" tabindex="4" type="password" value="<?php echo set_value('repasswd'); ?>" ><span id='repasswd_error' class="moreInfo">重复上面的密码</span></li>
					</ul>
					<input style="margin-left:40px;"  type="submit" value="注册"/>
					</form>
                  </div>
            </div>
          </div>
          <div class="c38r">
            <div class="subcr"  role="complementary">
                  <div class="info">
                    <h4>Development Information</h4>
                    <p>Ver. 3.2<br />
                      $Revision: 430 $<br />
                      $Date: 2009-10-27 21:15:57 +0100 (Di, 27. Okt 2009) $</p>
                  </div>
                  <div class="info">
                  <h3>Quick start using YAML</h3>
                  <h4><em>&laquo;Simple Project&raquo; Template</em></h4>
                  <p>You need some  help for a quick start? Just <a href="http://www.yaml.de/en/download.html">download</a> and unpack the <em>&laquo;Simple Project&raquo; template </em> on your server or local machine. It includes a <a href="http://www.yaml.de/en/documentation/practice/general.html"><strong>ready to use</strong> folder structure</a> containing all necessary files for your first YAML-based layout.</p>
                  <p>If you're familiar with HTML &amp; CSS, you can start building your screen layout  by editing <em>basemod.css</em> &amp; <em>content.css</em> in the <em>css/screen/</em> folder.                  </p>
                  </div>
               </div>
            </div>
          </div>
        </div> 

    </div>
    <!-- end: #main -->
<?php $this->load->view('user/footer');?>